The Models

Hills.key - This model represents a straight track for which the slope changes. The slope affects the component of 
acceleration that comes from gravity. The total acceleration of the car is a+g, where a is the chosen acceleration
and g is the accleration from gravity. g represents Gsin(theta), since sin(theta) evolves from -1 to 1 for realistic
slopes, we linearly evolve g from -G to G. 
Safety and efficiency for this model is represented as having the velocity stay between vMin and vMax, so the initial
constaints represent safety in extreme conditions. For example, if velocity is vMin and the acceleration from gravity
is at -G, then accelerating with A should keep us from dipping under vMin (constain on line 64), the constaints on lines
61-63 represent other extreme conditions.

Helix_Hills.key: This model represents a circular (helix) track with a constant radius, but a changing slope (similar to Hills).
The buggy's motion is considered in terms of its radius around the same center pont as the track, we assume that buggyR = v^2/fr
and base the rest of this model on this fact. Since the track does not change, we consider a track where the inner border is at
vMin^2/fr and the outer radius is at vMax^2/fr, this is a simplifying assumption, but it lets us consider all the possible vel.
that the buggy can reach. Similarly to Hills.key, we need to make sure that the buggy can always make a safe decision even as the 
track is changing. Allowing the controller to pick (a = A,-B,0) from any radius on the track is an unrealistic model, so we pick
constaints such that there is at least one safe decision at any point on the track, but this decision will work with any slope.

The constaints are based on the idea that when v >= (vMin+vMax)/2, then it will be safe to brake (causing the buggy to move toward
the inside of the track), similarly when v <= (vMin+vMax)/2, then it will be safe for the buggy to accelerate. The constaints
garauntee safety in extreme cases, which would lead to safety in less extreme cases. The 4 constaints consider the following states:
1. (line 78) the buggy is at the outside of the track and slope is maximally positive, we ensure that braking is sufficient to
avoid crashing into the outer border of the track.
2. (line 80) The buggy is at v = (vMin+vMax)/2 and braking with a maximally negative slope, we ensure that braking is sufficient to
avoid crashing into the inside of the track.
3. (line 72) The buggy is at v = (vMin+vMax)/2 and accelerating with a maximally positive slope, we ensure that this acceleration
will not make the buggy crash into the outside of the track.
4. (line 74) The buggy is at the inside border and accelerating with a maximally negative slope, ensure that acclerating is sufficient
to avoid crashing into the inner border of the track.

Test.key - using the initial conditions (preserved by the loop invariant), ensure that there is always a test that passes in the
Helix_Hills.key control decision.


Helix.key - This model represents a circular track with a constant slope, but the helix can be expanding or shrinking. This is modeled
by having the trackR shrink or grow linearly. The buggy's motion is similar to that described in Helix_Hills, but the constaints need
different considerations. In particular, we now need to consider how to not crash into a border that is moving. Since we make the track
generation and control decision at the same time, we can use the information about how the border is changing. We ensure that there is 
always a safe decision based on the following idea: If the track radius is not changing, it will be safe to coast. If the track radius is
growing, then it will be safe to accelerate in the inner half of the track and coast in the other half. If the track radius is shrinking,
then it will be safe to brake in the outer half and coast in the inner half. These constaints are defined on lines 79-101. The control uses these contraints to garauntee safety.